<div class="layui-container">
    <div class="layui-row">
	 <div class="layui-col-md12 layui-col-xs12">  
                <div class="widget-head">
                    <div class="widget-title">冻结列表</div>
                </div>
                    <!-- 工具栏 -->
					<div class="layui-col-md12 layui-col-xs12 widget-body ">			
                        <form class="layui-form"  method="post" action="{Url('User/index')}">
                            <input type="hidden" nlayere="s" value="/{$request->pathinfo()}">
                            <div class="layui-u-sm-12 layui-u-md-12 layui-col-lg12"> 
								<div class="layui-form-item">
									<div class="layui-col-md4 layui-col-flex">
										<label  class="layui-form-label">性别：</label>
										{$gender = $request->get('gender')}
										<select class="form-control"  name="gender" data-layer-selected="{btnSize: 'sm', placeholder: '性别'}">
											<option value="-1"
												{$gender === '-1' ? 'selected' : ''}>全部
											</option>
											<option value="1"
												{$gender === '1' ? 'selected' : ''}>男
											</option>
											<option value="2"
												{$gender === '2' ? 'selected' : ''}>女
											</option>
											<option value="0"
												{$gender === '0' ? 'selected' : ''}>未知
											</option>
										</select>
									</div>
									<div class="layui-col-md3">
										<label class="layui-form-label">微信昵称：</label>
										<div class="layui-input-inline">
											<input name="nickName" type="text"  class="layui-input" placeholder="请输入微信昵称" value="{$request->get('nickName ')}">
										</div>
									</div>
									<div class="layui-col-md4 laui-col-width" >
										<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
									</div>  
								</div>	
                            </div>
                        </form>
                   
                <div class="layui-col-md12" >
                        <table width="100%" class="layui-table">
                            <thead>
                            <tr>
                                <th>用户ID</th>
                                <th>头像</th>
                                <th>昵称</th>
                                <th>累积消费</th>
                                <th>性别</th>
                                <th>国家</th>
                                <th>省份</th>
                                <th>城市</th>
                                <th>注册时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if (!$list->isEmpty())}{foreach ($list as $item)}
                                <tr>
                                    <td>{$item['user_id']}</td>
                                    <td>
                                        <a href="{$item['avatarUrl']}" title="点击查看大图" target="_blank">
                                            <img src="{$item['avatarUrl']}" width="72" height="72" alt="">
                                        </a>
                                    </td>
                                    <td>{$item['nickName']}</td>
                                    <td>{$item['money']}</td>
                                    <td>{$item['gender']}</td>
                                    <td>{$item['country'] ?: '--'}</td>
                                    <td>{$item['province'] ?: '--'}</td>
                                    <td>{$item['city'] ?: '--'}</td>
                                    <td>{$item['create_time']}</td>
                                    <td>
                                        <div class="tpl-table-black-operation">
											<a class="tpl-table-black-operation-primary uefreezing" href="javascript:void(0);"
                                               class="tpl-table-black-operation-del"
                                               data-id="{$item['user_id']}">
                                                <i class="mdi menu-icon mdi-pencil-lock"></i> 解除冻结
                                            </a>
											 <a href="javascript:void(0);"
                                               class="item-delete tpl-table-black-operation-del"
                                               data-id="{$item['user_id']}">
                                                <i class="mdi menu-icon mdi-delete-forever"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            {/foreach}{else/}
                                <tr>
                                    <td colspan="10" class="layer-text-center">暂无记录</td>
                                </tr>
                           {/if}
                            </tbody>
                        </table>
						<div class="layui-col-md12 layui-col-xs12">
							<div class="">{$page|raw} </div>
							<div class="pagination-total">
								<div class="">总记录：{$list->total()}</div>
							</div>
						</div>
                </div>
			 </div>
           
        </div>
    </div>
</div>
<script>
    $(function () {
        // 删除元素
        var url = "index.php?s=/user/user/remove";

        $('.item-delete').delete('user_id', url, '删除后不可恢复，确定要删除吗？');
		var url="index.php?s=/user/user/uefreezing";
		$(".uefreezing").delete('user_id', url, '确定要解冻吗？');
    });
</script>

